# vim:set noet ts=4:
#
# ibust - IBus with Traditional interface
#
# Copyright (c) 2013 Daniel Sun
# Copyright (c) 2010, Google Inc. All rights reserved.
# Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA  02111-1307  USA

libibust = $(top_builddir)/src/libibust-@IBUST_API_VERSION@.la

memconf_programs = \
	ibust-memconf \
	$(NULL)

if ENABLE_MEMCONF
libexec_PROGRAMS = $(memconf_programs)
else
noinst_PROGRAMS = $(memconf_programs)
endif

ibust_memconf_SOURCES = \
	main.c \
	config.c \
	config.h \
	$(NULL)
ibust_memconf_CFLAGS = \
	@GLIB2_CFLAGS@ \
	@GIO2_CFLAGS@ \
	-DG_LOG_DOMAIN=\"IBUST\" \
	-I$(top_srcdir)/src \
	-I$(top_builddir)/src \
	$(NULL)
ibust_memconf_LDADD = \
	@GOBJECT2_LIBS@ \
	@GLIB2_LIBS@ \
	@GIO2_LIBS@ \
	$(libibust) \
	$(NULL)
ibust_memconf_DEPENDENCIES = \
	$(libibust) \
	$(NULL)

if ENABLE_MEMCONF
component_DATA = \
	memconf.xml \
	$(NULL)

componentdir = $(pkgdatadir)/component
endif

CLEANFILES = \
	memconf.xml \
	$(NULL)

EXTRA_DIST = \
	memconf.xml.in.in \
	$(NULL)

memconf.xml: memconf.xml.in
	$(AM_V_GEN) \
	( \
		libexecdir=${libexecdir}; \
		s=`cat $<`; \
		eval "echo \"$${s}\""; \
	) > $@

$(libibust):
	$(MAKE) -C $(top_builddir)/src

-include $(top_srcdir)/git.mk
